import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AppConfig {

    @Conditional(value = {CityCondition.class})
    @Bean(name = "city")
    public Car city() {
        return new Camry();
    }
}
